package com.ruoyi.electronicFence.service.Impl;

import java.util.List;

import com.ruoyi.electronicFence.domain.TEfAlarm;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.electronicFence.mapper.TEfAlarmPersonMapper;
import com.ruoyi.electronicFence.domain.TEfAlarmPerson;
import com.ruoyi.electronicFence.service.ITEfAlarmPersonService;

/**
 * 报警人员关联数据Service业务层处理
 *
 * @author sxygsj
 * @date 2024-05-29
 */
@Service
public class TEfAlarmPersonServiceImpl implements ITEfAlarmPersonService
{
    @Autowired
    private TEfAlarmPersonMapper tEfAlarmPersonMapper;

    /**
     * 查询报警人员关联数据
     *
     * @param id 报警人员关联数据主键
     * @return 报警人员关联数据
     */
    @Override
    public TEfAlarmPerson selectTEfAlarmPersonById(Long id)
    {
        return tEfAlarmPersonMapper.selectTEfAlarmPersonById(id);
    }

    /**
     * 查询报警人员关联数据列表
     *
     * @param tEfAlarmPerson 报警人员关联数据
     * @return 报警人员关联数据
     */
    @Override
    public List<TEfAlarmPerson> selectTEfAlarmPersonList(TEfAlarmPerson tEfAlarmPerson)
    {
        return tEfAlarmPersonMapper.selectTEfAlarmPersonList(tEfAlarmPerson);
    }

    /**
     * 查询报警人员关联数据列表
     *
     * @return 报警人员关联数据
     */
    @Override
    public List<TEfAlarmPerson> selectTEfAlarmPersonList2(List<TEfAlarm> list)
    {
        return tEfAlarmPersonMapper.selectTEfAlarmPersonListByPersonIds(list);
    }

    /**
     * 新增报警人员关联数据
     *
     * @param tEfAlarmPerson 报警人员关联数据
     * @return 结果
     */
    @Override
    public int insertTEfAlarmPerson(TEfAlarmPerson tEfAlarmPerson)
    {
        return tEfAlarmPersonMapper.insertTEfAlarmPerson(tEfAlarmPerson);
    }

    /**
     * 修改报警人员关联数据
     *
     * @param tEfAlarmPerson 报警人员关联数据
     * @return 结果
     */
    @Override
    public int updateTEfAlarmPerson(TEfAlarmPerson tEfAlarmPerson)
    {
        return tEfAlarmPersonMapper.updateTEfAlarmPerson(tEfAlarmPerson);
    }

    /**
     * 批量删除报警人员关联数据
     *
     * @param ids 需要删除的报警人员关联数据主键
     * @return 结果
     */
    @Override
    public int deleteTEfAlarmPersonByIds(Long[] ids)
    {
        return tEfAlarmPersonMapper.deleteTEfAlarmPersonByIds(ids);
    }

    /**
     * 删除报警人员关联数据信息
     *
     * @param id 报警人员关联数据主键
     * @return 结果
     */
    @Override
    public int deleteTEfAlarmPersonById(Long id)
    {
        return tEfAlarmPersonMapper.deleteTEfAlarmPersonById(id);
    }
}
